Skip to content

Commit

Permalink
fix: force detect unpkg-white-list (#695)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored May 30, 2024
1 parent dcc5509 commit 9664504
Show file tree
Hide file tree
Showing 104 changed files with 214 additions and 125 deletions.
11 changes: 9 additions & 2 deletions app/core/service/PackageVersionFileService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { PackageManagerService } from './PackageManagerService';
import { CacheAdapter } from '../../common/adapter/CacheAdapter';

const unpkgWhiteListUrl = 'https://github.com/cnpm/unpkg-white-list';
const CHECK_TIMEOUT = process.env.NODE_ENV === 'test' ? 1 : 60000;

@SingletonProto({
accessLevel: AccessLevel.PUBLIC,
Expand All @@ -46,6 +47,7 @@ export class PackageVersionFileService extends AbstractService {
@Inject()
private readonly cacheAdapter: CacheAdapter;

#unpkgWhiteListCheckTime: number = 0;
#unpkgWhiteListCurrentVersion: string = '';
#unpkgWhiteListAllowPackages: Record<string, {
version: string;
Expand Down Expand Up @@ -81,6 +83,11 @@ export class PackageVersionFileService extends AbstractService {

async #updateUnpkgWhiteList() {
if (!this.config.cnpmcore.enableSyncUnpkgFilesWhiteList) return;
if (Date.now() - this.#unpkgWhiteListCheckTime <= CHECK_TIMEOUT) {
// check update every 60s
return;
}
this.#unpkgWhiteListCheckTime = Date.now();
const whiteListScope = '';
const whiteListPackageName = 'unpkg-white-list';
const whiteListPackageVersion = await this.packageVersionRepository.findVersionByTag(
Expand All @@ -103,7 +110,7 @@ export class PackageVersionFileService extends AbstractService {
);
}

async #checkPackageVersionInUnpkgWhiteList(pkgScope: string, pkgName: string, pkgVersion: string) {
async checkPackageVersionInUnpkgWhiteList(pkgScope: string, pkgName: string, pkgVersion: string) {
if (!this.config.cnpmcore.enableSyncUnpkgFilesWhiteList) return;
await this.#updateUnpkgWhiteList();

Expand Down Expand Up @@ -180,7 +187,7 @@ export class PackageVersionFileService extends AbstractService {
if (!pkg) return files;

// check unpkg white list
await this.#checkPackageVersionInUnpkgWhiteList(pkg.scope, pkg.name, pkgVersion.version);
await this.checkPackageVersionInUnpkgWhiteList(pkg.scope, pkg.name, pkgVersion.version);

const dirname = `unpkg_${pkg.fullname.replace('/', '_')}@${pkgVersion.version}_${randomUUID()}`;
const tmpdir = await createTempDir(this.config.dataDir, dirname);
Expand Down
1 change: 1 addition & 0 deletions app/port/controller/PackageVersionFileController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export class PackageVersionFileController extends AbstractController {
return files;
}

await this.packageVersionFileService.checkPackageVersionInUnpkgWhiteList(scope, name, packageVersion.version);
const file = await this.packageVersionFileService.showPackageVersionFile(packageVersion, path);
const hasMeta = typeof meta === 'string';

Expand Down
2 changes: 1 addition & 1 deletion app/repository/TaskRepository.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { AccessLevel, SingletonProto, Inject } from '@eggjs/tegg';
import { ModelConvertor } from './util/ModelConvertor';
import type { Task as TaskModel } from './model/Task';
Expand Down
2 changes: 1 addition & 1 deletion app/repository/util/EntityProperty.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { EggProtoImplClass } from '@eggjs/tegg';
import { ModelConvertorUtil } from './ModelConvertorUtil';

Expand Down
6 changes: 3 additions & 3 deletions config/config.default.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';
import { randomUUID } from 'crypto';
import { join } from 'path';
import { strict as assert } from 'node:assert';
import { randomUUID } from 'node:crypto';
import { join } from 'node:path';
import { EggAppConfig, PowerPartial } from 'egg';
import OSSClient from 'oss-cnpm';
import { patchAjv } from '../app/port/typebox';
Expand Down
3 changes: 1 addition & 2 deletions test/cli/npm/access.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// import assert from 'assert';
import path from 'path';
import path from 'node:path';
import { app } from 'egg-mock/bootstrap';
import coffee from 'coffee';
import semver from 'semver';
Expand Down
4 changes: 2 additions & 2 deletions test/cli/npm/install.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import path from 'path';
import { strict as assert } from 'node:assert';
import path from 'node:path';
import { app } from 'egg-mock/bootstrap';
import coffee from 'coffee';
import { TestUtil } from '../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/PackageUtil.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { formatAuthor, formatTarball, hasShrinkWrapInTgz } from '../../app/common/PackageUtil';
import { TestUtil } from '../TestUtil';

Expand Down
2 changes: 1 addition & 1 deletion test/common/UserUtil.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { randomToken, checkToken } from '../../app/common/UserUtil';

describe('test/common/UserUtil.test.ts', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/BugVersionStore.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { BugVersionStore } from '../../../app/common/adapter/BugVersionStore';
import { BugVersion } from '../../../app/core/entity/BugVersion';
Expand Down
4 changes: 2 additions & 2 deletions test/common/adapter/CacheAdapter.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from 'assert';
import { setTimeout } from 'timers/promises';
import { strict as assert } from 'node:assert';
import { setTimeout } from 'node:timers/promises';
import { app, mock } from 'egg-mock/bootstrap';
import { CacheAdapter } from '../../../app/common/adapter/CacheAdapter';

Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/NpmRegistry.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { NPMRegistry } from '../../../app/common/adapter/NPMRegistry';

Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/ApiBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { ApiBinary } from '../../../../app/common/adapter/binary/ApiBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/BucketBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { BucketBinary } from '../../../../app/common/adapter/binary/BucketBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/ChromeForTestingBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { ChromeForTestingBinary } from '../../../../app/common/adapter/binary/ChromeForTestingBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/EdgedriverBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { EdgedriverBinary } from '../../../../app/common/adapter/binary/EdgedriverBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/ElectronBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { ElectronBinary } from '../../../../app/common/adapter/binary/ElectronBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/GithubBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { GithubBinary } from '../../../../app/common/adapter/binary/GithubBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/ImageminBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { ImageminBinary } from '../../../../app/common/adapter/binary/ImageminBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/NodeBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { NodeBinary } from '../../../../app/common/adapter/binary/NodeBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/NodePreGypBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { NodePreGypBinary } from '../../../../app/common/adapter/binary/NodePreGypBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/NwjsBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { NwjsBinary } from '../../../../app/common/adapter/binary/NwjsBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/PlaywrightBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { PlaywrightBinary } from '../../../../app/common/adapter/binary/PlaywrightBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/PuppeteerBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { PuppeteerBinary } from '../../../../app/common/adapter/binary/PuppeteerBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/binary/SqlcipherBinary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { SqlcipherBinary } from '../../../../app/common/adapter/binary/SqlcipherBinary';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { ChangesStreamChange } from '../../../../app/common/adapter/changesStream/AbstractChangesStream';
import { CnpmcoreChangesStream } from '../../../../app/common/adapter/changesStream/CnpmcoreChangesStream';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { ChangesStreamChange } from '../../../../app/common/adapter/changesStream/AbstractChangesStream';
import { CnpmjsorgChangesStream } from '../../../../app/common/adapter/changesStream/CnpmjsorgChangesStream';
Expand Down
2 changes: 1 addition & 1 deletion test/common/adapter/changesStream/NpmChangesStream.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Readable, Duplex } from 'node:stream';
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { ChangesStreamChange } from '../../../../app/common/adapter/changesStream/AbstractChangesStream';
import { NpmChangesStream } from '../../../../app/common/adapter/changesStream/NpmChangesStream';
Expand Down
2 changes: 1 addition & 1 deletion test/core/entity/BugVersion.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { strict as assert } from 'node:assert';
import { BugVersion } from '../../../app/core/entity/BugVersion';
import assert from 'assert';

describe('test/core/entity/BugVersion.test.ts', () => {
const bugVersion = new BugVersion({
Expand Down
2 changes: 1 addition & 1 deletion test/core/entity/PaddingSemver.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { PaddingSemVer } from '../../../app/core/entity/PaddingSemVer';

describe('test/npm/core/entity/PaddingSemver.test.ts', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/core/entity/SqlRange.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { SqlRange } from '../../../app/core/entity/SqlRange';

describe('test/npm/core/entity/SqlRange.test.ts', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/core/event/BugVersionFixHandler.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { BUG_VERSIONS } from '../../../app/common/constants';
import { CacheService } from '../../../app/core/service/CacheService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/event/StoreManifest.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../test/TestUtil';
import { getScopeAndName } from '../../../app/common/PackageUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/BinarySyncerService/createTask.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { BinarySyncerService } from '../../../../app/core/service/BinarySyncerService';
import { BinaryName } from '../../../../config/binaries';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/BinarySyncerService/executeTask.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { BinarySyncerService } from '../../../../app/core/service/BinarySyncerService';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { BugVersionService } from '../../../../app/core/service/BugVersionService';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { BugVersionService } from '../../../../app/core/service/BugVersionService';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { BugVersionService } from '../../../../app/core/service/BugVersionService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/ChangesStreamService.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { Readable } from 'node:stream';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/CreateHookTriggerService.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../test/TestUtil';
import { HookManageService } from '../../../app/core/service/HookManageService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/HookManageService/createHook.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { HookManageService } from '../../../../app/core/service/HookManageService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/HookManageService/deleteHook.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { HookManageService } from '../../../../app/core/service/HookManageService';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { HookManageService } from '../../../../app/core/service/HookManageService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/HookManageService/updateHook.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { HookManageService } from '../../../../app/core/service/HookManageService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/HookTriggerService.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { HttpClientRequestOptions } from 'egg';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/PackageManagerService/block.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { PackageManagerService } from '../../../../app/core/service/PackageManagerService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/PackageManagerService/publish.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { PackageManagerService } from '../../../../app/core/service/PackageManagerService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/PackageSyncerService/createTask.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { setTimeout } from 'timers/promises';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/PackageSyncerService/executeTask.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import { TestUtil } from '../../../../test/TestUtil';
import { PackageSyncerService } from '../../../../app/core/service/PackageSyncerService';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { PackageSyncerService } from '../../../../app/core/service/PackageSyncerService';
import { Task as TaskModel } from '../../../../app/repository/model/Task';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { PackageSyncerService } from '../../../../app/core/service/PackageSyncerService';
import { RegistryManagerService } from '../../../../app/core/service/RegistryManagerService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/PackageVersionService.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mock } from 'egg-mock/bootstrap';
import npa from 'npm-package-arg';

Expand Down
2 changes: 1 addition & 1 deletion test/core/service/RegistryManagerService/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { RegistryManagerService } from '../../../../app/core/service/RegistryManagerService';
import { RegistryType } from '../../../../app/common/enum/Registry';
Expand Down
2 changes: 1 addition & 1 deletion test/core/service/ScopeManagerService/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { ScopeManagerService } from '../../../../app/core/service/ScopeManagerService';

Expand Down
2 changes: 1 addition & 1 deletion test/core/service/TaskService/findExecuteTask.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app, mm } from 'egg-mock/bootstrap';
import { TaskService } from '../../../../app/core/service/TaskService';
import { PackageSyncerService } from '../../../../app/core/service/PackageSyncerService';
Expand Down
2 changes: 1 addition & 1 deletion test/core/util/EntityUtil.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { strict as assert } from 'node:assert';
import { EntityUtil } from '../../../app/core/util/EntityUtil';
import assert from 'assert';

describe('test/core/util/EntityUtil.test.ts', () => {
describe('convertPageOptionsToLimitOption', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/infra/QueueAdapter.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from 'assert';
import { strict as assert } from 'node:assert';
import { app } from 'egg-mock/bootstrap';
import { RedisQueueAdapter } from '../../app/infra/QueueAdapter';

Expand Down
Loading

0 comments on commit 9664504

Please sign in to comment.