From 343f2ffc85df6bb3f86b998c47ef9ef542594e7f Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 3 Oct 2023 20:05:26 +0800 Subject: [PATCH 01/10] init --- tests/language-tools.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/language-tools.ts diff --git a/tests/language-tools.ts b/tests/language-tools.ts new file mode 100644 index 0000000..36be5f8 --- /dev/null +++ b/tests/language-tools.ts @@ -0,0 +1,12 @@ +import { runInRepo } from '../utils' +import { RunOptions } from '../types' + +export async function test(options: RunOptions) { + await runInRepo({ + ...options, + repo: 'vuejs/language-tools', + branch: 'master', + build: 'build', + test: 'test', + }) +} From b1e5996e7094e3bf94ab5d6926bbc9868bf22b29 Mon Sep 17 00:00:00 2001 From: so1ve Date: Thu, 5 Oct 2023 18:42:31 +0800 Subject: [PATCH 02/10] feat: integrate language-tools --- tests/language-tools.ts | 1 + types.d.ts | 1 + utils.ts | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/language-tools.ts b/tests/language-tools.ts index 36be5f8..1d616a3 100644 --- a/tests/language-tools.ts +++ b/tests/language-tools.ts @@ -5,6 +5,7 @@ export async function test(options: RunOptions) { await runInRepo({ ...options, repo: 'vuejs/language-tools', + overrideRoot: 'packages/vue-test-workspace', branch: 'master', build: 'build', test: 'test', diff --git a/types.d.ts b/types.d.ts index 985ade1..1bf0dfa 100644 --- a/types.d.ts +++ b/types.d.ts @@ -11,6 +11,7 @@ export interface EnvironmentData { export interface RunOptions { workspace: string root: string + overrideRoot?: string vuePath: string vueMajor: number verify?: boolean diff --git a/utils.ts b/utils.ts index d575fef..b5faea3 100644 --- a/utils.ts +++ b/utils.ts @@ -220,6 +220,9 @@ export async function runInRepo(options: RunOptions & RepoOptions) { options.workspace, options.dir || repo.substring(repo.lastIndexOf('/') + 1), ) + const overrideDir = options.overrideRoot + ? path.resolve(options.workspace, options.overrideRoot) + : dir if (!skipGit) { await setupRepo({ repo, dir, branch, tag, commit }) @@ -284,7 +287,7 @@ export async function runInRepo(options: RunOptions & RepoOptions) { overrides[pkg.name] ||= pkg.hashedVersion } } - await applyPackageOverrides(dir, pkg, overrides) + await applyPackageOverrides(overrideDir, pkg, overrides) await beforeBuildCommand?.(pkg.scripts) await buildCommand?.(pkg.scripts) if (test) { From f4b9043dee2d363f36730efb90e899a2b8b98dc2 Mon Sep 17 00:00:00 2001 From: so1ve Date: Thu, 5 Oct 2023 19:06:29 +0800 Subject: [PATCH 03/10] fix --- utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.ts b/utils.ts index b5faea3..3ae85be 100644 --- a/utils.ts +++ b/utils.ts @@ -221,7 +221,7 @@ export async function runInRepo(options: RunOptions & RepoOptions) { options.dir || repo.substring(repo.lastIndexOf('/') + 1), ) const overrideDir = options.overrideRoot - ? path.resolve(options.workspace, options.overrideRoot) + ? path.resolve(options.workspace, dir) : dir if (!skipGit) { From c95cafc850b75a71bbe5995e95f94ab20bfc19e1 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 6 Oct 2023 02:55:24 +0800 Subject: [PATCH 04/10] Update utils.ts --- utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.ts b/utils.ts index 3ae85be..7e33d53 100644 --- a/utils.ts +++ b/utils.ts @@ -221,7 +221,7 @@ export async function runInRepo(options: RunOptions & RepoOptions) { options.dir || repo.substring(repo.lastIndexOf('/') + 1), ) const overrideDir = options.overrideRoot - ? path.resolve(options.workspace, dir) + ? path.resolve(dir, options.overrideRoot) : dir if (!skipGit) { From 01b4227b3607250cea920ad88259dde7fe48b627 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 6 Oct 2023 02:59:57 +0800 Subject: [PATCH 05/10] Update ecosystem-ci-from-pr.yml --- .github/workflows/ecosystem-ci-from-pr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ecosystem-ci-from-pr.yml b/.github/workflows/ecosystem-ci-from-pr.yml index 63b69f0..e052a34 100644 --- a/.github/workflows/ecosystem-ci-from-pr.yml +++ b/.github/workflows/ecosystem-ci-from-pr.yml @@ -29,6 +29,7 @@ on: type: choice options: - "-" + - language-tools # - naive-ui - nuxt - pinia @@ -95,6 +96,7 @@ jobs: strategy: matrix: suite: + - language-tools # - naive-ui - nuxt - pinia From 92a7b98f3f66d73b20c29957d89c2a5e07516cc6 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 6 Oct 2023 03:00:18 +0800 Subject: [PATCH 06/10] Update ecosystem-ci-selected.yml --- .github/workflows/ecosystem-ci-selected.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ecosystem-ci-selected.yml b/.github/workflows/ecosystem-ci-selected.yml index 7ff7f2c..179565c 100644 --- a/.github/workflows/ecosystem-ci-selected.yml +++ b/.github/workflows/ecosystem-ci-selected.yml @@ -34,6 +34,7 @@ on: required: true type: choice options: + - language-tools # - naive-ui - nuxt - pinia From 0837f0ee2648cb64027df6eb101a7586897a5613 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 6 Oct 2023 03:00:43 +0800 Subject: [PATCH 07/10] Update ecosystem-ci.yml --- .github/workflows/ecosystem-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ecosystem-ci.yml b/.github/workflows/ecosystem-ci.yml index bd84ac6..e16f5cf 100644 --- a/.github/workflows/ecosystem-ci.yml +++ b/.github/workflows/ecosystem-ci.yml @@ -40,6 +40,7 @@ jobs: strategy: matrix: suite: + - language-tools # - naive-ui - nuxt - pinia From 1775d0823a3ab6d8d3f20860b249a68b90b19302 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 8 Oct 2023 16:44:11 +0800 Subject: [PATCH 08/10] Discard changes to utils.ts --- utils.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/utils.ts b/utils.ts index 7e33d53..d575fef 100644 --- a/utils.ts +++ b/utils.ts @@ -220,9 +220,6 @@ export async function runInRepo(options: RunOptions & RepoOptions) { options.workspace, options.dir || repo.substring(repo.lastIndexOf('/') + 1), ) - const overrideDir = options.overrideRoot - ? path.resolve(dir, options.overrideRoot) - : dir if (!skipGit) { await setupRepo({ repo, dir, branch, tag, commit }) @@ -287,7 +284,7 @@ export async function runInRepo(options: RunOptions & RepoOptions) { overrides[pkg.name] ||= pkg.hashedVersion } } - await applyPackageOverrides(overrideDir, pkg, overrides) + await applyPackageOverrides(dir, pkg, overrides) await beforeBuildCommand?.(pkg.scripts) await buildCommand?.(pkg.scripts) if (test) { From 6dd2c616794149dcd422cf35e154d25f6df5b8a6 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 8 Oct 2023 16:44:16 +0800 Subject: [PATCH 09/10] Discard changes to types.d.ts --- types.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types.d.ts b/types.d.ts index 1bf0dfa..985ade1 100644 --- a/types.d.ts +++ b/types.d.ts @@ -11,7 +11,6 @@ export interface EnvironmentData { export interface RunOptions { workspace: string root: string - overrideRoot?: string vuePath: string vueMajor: number verify?: boolean From 02ad8f80f2bb246323d12ed596b18ff292b7e08b Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 8 Oct 2023 16:44:36 +0800 Subject: [PATCH 10/10] chore: remove `overrideRoot` --- tests/language-tools.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/language-tools.ts b/tests/language-tools.ts index 1d616a3..36be5f8 100644 --- a/tests/language-tools.ts +++ b/tests/language-tools.ts @@ -5,7 +5,6 @@ export async function test(options: RunOptions) { await runInRepo({ ...options, repo: 'vuejs/language-tools', - overrideRoot: 'packages/vue-test-workspace', branch: 'master', build: 'build', test: 'test',