From ace92b0562331c93f54d356b64eecfcbe4fcbc11 Mon Sep 17 00:00:00 2001 From: ygqygq2 Date: Sat, 13 Apr 2024 16:14:21 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20windows=20=E4=B9=9F=E8=83=BD=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ygqygq2 --- package.json | 3 ++- pnpm-lock.yaml | 18 ++++++++++++++++++ src/test/suite/common/executeCommandOnFile.ts | 4 ++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0b7696f..603c9ac 100644 --- a/package.json +++ b/package.json @@ -531,7 +531,7 @@ "compile": "npm run esbuild-base -- --sourcemap", "package": "vsce package --no-dependencies", "publish": "vsce publish --no-dependencies", - "clean": "rm -rf out/", + "clean": "rimraf out/", "test-compile": "npm run clean && tsc -p ./ && npm run compile", "test": "npm run test-compile && vscode-test", "test:suite:mocha": "npm run test-compile && node out/test/runTests.js", @@ -570,6 +570,7 @@ "jest-mock-vscode": "^3.0.2", "lint-staged": "^15.2.2", "mocha": "^10.4.0", + "rimraf": "^5.0.5", "simple-git-hooks": "^2.11.1", "tmp": "^0.2.3", "ts-node": "^10.9.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b3ffdab..0c2f998 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -109,6 +109,9 @@ devDependencies: mocha: specifier: ^10.4.0 version: 10.4.0 + rimraf: + specifier: ^5.0.5 + version: 5.0.5 simple-git-hooks: specifier: ^2.11.1 version: 2.11.1 @@ -680,6 +683,7 @@ packages: resolution: {integrity: sha512-p9rGKYkHdFMzhckOTFubfxgyIO1vw//7IIjBBRVzyZebWlzRLeNhqxuSaZ7kCEKVkm/kuC9fVRW9HkC/zNRG2w==} cpu: [arm64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -688,6 +692,7 @@ packages: resolution: {integrity: sha512-nDY6Yz5xS/Y4M2i9JLQd3Rofh5OR8Bn8qe3Mv/qCVpHFlwtZSBYSPaU4mrGazWkXrdQ98GB//H0BirGR/SKFSw==} cpu: [arm64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -696,6 +701,7 @@ packages: resolution: {integrity: sha512-im7HE4VBL+aDswvcmfx88Mp1soqL9OBsdDBU8NqDEYtkri0qV0THhQsvZtZeNNlLeCUQ16PZyv7cqutjDF35qw==} cpu: [ppc64le] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -704,6 +710,7 @@ packages: resolution: {integrity: sha512-RWdiHuAxWmzPJgaHJdpvUUlDz8sdQz4P2uv367T2JocdDa98iRw2UjIJ4QxSyt077mXZT2X6pKfT2iYtVEvOFw==} cpu: [riscv64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -712,6 +719,7 @@ packages: resolution: {integrity: sha512-VMgaGQ5zRX6ZqV/fas65/sUGc9cPmsntq2FiGmayW9KMNfWVG/j0BAqImvU4KTeOOgYSf1F+k6at1UfNONuNjA==} cpu: [s390x] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -720,6 +728,7 @@ packages: resolution: {integrity: sha512-9Q7DGjZN+hTdJomaQ3Iub4m6VPu1r94bmK2z3UeWP3dGUecRC54tmVu9vKHTm1bOt3ASoYtEz6JSRLFzrysKlA==} cpu: [x64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -728,6 +737,7 @@ packages: resolution: {integrity: sha512-JNEG/Ti55413SsreTguSx0LOVKX902OfXIKVg+TCXO6Gjans/k9O6ww9q3oLGjNDaTLxM+IHFMeXy/0RXL5R/g==} cpu: [x64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -2812,6 +2822,14 @@ packages: resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} dev: true + /rimraf@5.0.5: + resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} + engines: {node: '>=14'} + hasBin: true + dependencies: + glob: 10.3.12 + dev: true + /rollup@4.14.1: resolution: {integrity: sha512-4LnHSdd3QK2pa1J6dFbfm1HN0D7vSK/ZuZTsdyUAlA6Rr1yTouUTL13HaDOGJVgby461AhrNGBS7sCGXXtT+SA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} diff --git a/src/test/suite/common/executeCommandOnFile.ts b/src/test/suite/common/executeCommandOnFile.ts index c1f539c..2d0316c 100644 --- a/src/test/suite/common/executeCommandOnFile.ts +++ b/src/test/suite/common/executeCommandOnFile.ts @@ -72,8 +72,8 @@ async function executeCommandWithRetry(options: { do { await vscode.commands.executeCommand(commandName, { workspaceFolderName }); - // 需要等待一段时间才能获取到结果 - await sleep(250); + // 需要等待一段时间才能获取到结果,而且性能低的时候需要更长时间 + await sleep(1000); actual = doc.getText(); retryCount++; } while (shouldRetry && originalText === actual && retryCount < 10);