Skip to content

Commit 9b3f3f7

Browse files
committed
Revert "chore: do not use workspace"
This reverts commit 9df3f0a. Revert "fix: netlify" This reverts commit a7bc240.
1 parent a7bc240 commit 9b3f3f7

File tree

10 files changed

+73
-119
lines changed

10 files changed

+73
-119
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ workspace
66
.pnpm-debug.log
77
.idea
88
website/src/data/remote/*.json
9-
website/dist

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
The CLI entry point lives in `ecosystem-ci.ts`, handling argument parsing, stack selection, and GitHub Actions plumbing. Shared helpers (`runInRepo`, git utilities, bootstrap logic) reside in `utils.ts`, while DTOs are defined in `types.d.ts`. Integration suites are colocated under `tests/<stack>/` (for example `tests/rspack/nuxt.ts` or `tests/rsbuild/plugins.ts`) and export an async `test(options: RunOptions)` function. Runtime clones are created under `workspace/`; treat this directory as disposable and keep it untracked. The `website/` directory hosts the deployed page, which pulls fresh data from the `data` branch via ecosystem CI rendering before the scheduled deployment jobs run.
55

66
## Build, Test, and Development Commands
7-
Use `pnpm install` to bootstrap dependencies (Node ≥18). Run targeted suites with `pnpm test --stack <stack> [suite]`, e.g. `pnpm test --stack rsbuild plugins`. Bisect regressions via `pnpm bisect --stack <stack>`. Execute `pnpm lint` to run `biome check .`. After cloning, `pnpm prepare` installs `simple-git-hooks` so the Biome pre-commit hook fires locally.
7+
Use `pnpm install` to bootstrap dependencies (Node ≥18). Run targeted suites with `pnpm test -- --stack <stack> [suite]`, e.g. `pnpm test -- --stack rsbuild plugins`. Bisect regressions via `pnpm bisect -- --stack <stack>`. Execute `pnpm lint` to run `biome check .`. After cloning, `pnpm prepare` installs `simple-git-hooks` so the Biome pre-commit hook fires locally.
88

99
## Coding Style & Naming Conventions
1010
Biome enforces space indentation, single quotes, normalized imports, and the shared lint rules. Follow the strict TypeScript settings in `tsconfig.json` (ESNext target, NodeNext resolution, `noImplicitOverride`). Name suite files in lowercase or kebab-case (`tests/rspack/lynx-stack.ts`), keep helpers camelCase, and reserve `test` exports for suite entry points.
@@ -13,7 +13,7 @@ Biome enforces space indentation, single quotes, normalized imports, and the sha
1313
Suites boot via `setupEnvironment` and must remain idempotent so reruns start clean. Prefer `runInRepo` with explicit `repo`, `branch`, `test`, and overrides so reviewers can audit each step. When adding scenarios, mirror the minimal patterns (for example `tests/rsbuild/examples.ts` with `test: ['build:rsbuild']`) and document any required environment tweaks.
1414

1515
## Commit & Pull Request Guidelines
16-
Commits follow short, imperative subjects (≤72 chars), elaborating in the body only when behavior changes. PRs should justify the change, list affected stacks or utilities, and include the exact validation command, e.g. `pnpm test --stack rspack modernjs`. Attach logs or screenshots for CI changes and highlight any new secrets or webhooks reviewers must configure.
16+
Commits follow short, imperative subjects (≤72 chars), elaborating in the body only when behavior changes. PRs should justify the change, list affected stacks or utilities, and include the exact validation command, e.g. `pnpm test -- --stack rspack modernjs`. Attach logs or screenshots for CI changes and highlight any new secrets or webhooks reviewers must configure.
1717

1818
## Environment & Tooling Notes
1919
The runner exports `ECOSYSTEM_CI`, `TURBO_FORCE`, and memory-safe `NODE_OPTIONS`; avoid overriding them unless a suite explicitly requires it. Keep `workspace/` untracked, and never commit runtime artifacts. Remember that network-dependent steps may need explicit approval in restricted environments.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ Workflows are scheduled to run automatically every day
1919

2020
- clone this repo
2121
- run `pnpm i`
22-
- run `pnpm test --stack <stack>` to run every suite under the selected stack (`rsbuild`, `rspack`, `rstest`, `rslib`, `rsdoctor`, or `rslint`)
23-
- run `pnpm test --stack rspack` to execute all Rspack suites (available stacks: `rsbuild`, `rspack`, `rstest`, `rslib`, `rsdoctor`, `rslint`)
24-
- run `pnpm test --stack rslib` to execute all Rslib suites
25-
- run `pnpm test --stack rsbuild plugins` to target a specific suite
22+
- run `pnpm test -- --stack <stack>` to run every suite under the selected stack (`rsbuild`, `rspack`, `rstest`, `rslib`, `rsdoctor`, or `rslint`)
23+
- run `pnpm test -- --stack rspack` to execute all Rspack suites (available stacks: `rsbuild`, `rspack`, `rstest`, `rslib`, `rsdoctor`, `rslint`)
24+
- run `pnpm test -- --stack rslib` to execute all Rslib suites
25+
- run `pnpm test -- --stack rsbuild plugins` to target a specific suite
2626
- or invoke `tsx ecosystem-ci.ts` directly for advanced commands such as `build`, `run-suites`, or `bisect`
2727

2828
The version selection flags apply to the chosen stack:
@@ -34,8 +34,8 @@ The repositories are checked out into `workspace` subdirectory as shallow clones
3434

3535
### Cheat sheet
3636

37-
- `pnpm test --stack rspack --release nightly <suite>`: run a nightly release of the selected stack
38-
- `pnpm test --stack rsbuild --branch main --suite-branch update-rsbuild <suite>`: use `update-rsbuild` branch for the suite to test `main`
37+
- `pnpm test -- --stack rspack --release nightly <suite>`: run a nightly release of the selected stack
38+
- `pnpm test -- --stack rsbuild --branch main --suite-branch update-rsbuild <suite>`: use `update-rsbuild` branch for the suite to test `main`
3939

4040
# How to add a new integration test
4141

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build]
2-
command = "pnpm install --frozen-lockfile && pnpm run website:build"
2+
command = "pnpm install --frozen-lockfile && pnpm --filter ecosystem-ci-website build"
33
publish = "website/dist"
44

55
[build.environment]

package.json

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@
1616
"bisect": "tsx ecosystem-ci.ts bisect",
1717
"lint": "biome check .",
1818
"prepare": "pnpm exec simple-git-hooks",
19-
"test": "tsx ecosystem-ci.ts",
20-
"website:fetch": "node ./website/scripts/fetch-remote-history.mjs",
21-
"website:dev": "pnpm run website:fetch && cd website && rsbuild dev",
22-
"website:dev:mock": "cross-env RSBUILD_PUBLIC_DATA_SOURCE=mock pnpm run website:fetch && cd website && cross-env RSBUILD_PUBLIC_DATA_SOURCE=mock rsbuild dev",
23-
"website:dev:cached": "cd website && rsbuild dev",
24-
"website:build": "pnpm run website:fetch && cd website && rsbuild build",
25-
"website:preview": "cd website && rsbuild preview"
19+
"test": "tsx ecosystem-ci.ts"
2620
},
2721
"simple-git-hooks": {
2822
"pre-commit": "pnpm exec nano-staged"
@@ -33,45 +27,26 @@
3327
"dependencies": {
3428
"@actions/cache": "^4.0.1",
3529
"@actions/core": "^1.10.0",
36-
"@fontsource/geist-sans": "^5.0.3",
3730
"@manypkg/get-packages": "^2.2.2",
38-
"@radix-ui/react-select": "^1.2.2",
39-
"@radix-ui/react-slot": "^1.1.0",
40-
"@rsbuild/core": "^1.5.17",
41-
"@rsbuild/plugin-react": "^1.4.1",
4231
"cac": "^6.7.14",
43-
"class-variance-authority": "^0.7.0",
44-
"clsx": "^2.0.0",
4532
"execa": "^7.1.1",
46-
"lucide-react": "^0.356.0",
4733
"node-fetch": "^3.3.1",
48-
"react": "^18.3.1",
49-
"react-dom": "^18.3.1",
50-
"react-router-dom": "^7.0.2",
51-
"tailwind-merge": "^2.3.0",
52-
"tailwindcss-animate": "^1.0.7",
5334
"yaml": "^2.8.1"
5435
},
5536
"devDependencies": {
5637
"@antfu/ni": "^0.20.0",
5738
"@biomejs/biome": "^1.9.4",
5839
"@types/node": "^18.15.5",
59-
"@types/react": "^18.3.3",
60-
"@types/react-dom": "^18.3.0",
6140
"@types/semver": "^7.3.13",
62-
"autoprefixer": "^10.4.19",
63-
"cross-env": "^7.0.3",
6441
"nano-staged": "^0.8.0",
65-
"postcss": "^8.4.39",
6642
"semver": "^7.3.8",
6743
"simple-git-hooks": "^2.8.1",
68-
"tailwindcss": "^3.4.6",
6944
"tsx": "^4.19.2",
70-
"typescript": "^5.5.4"
45+
"typescript": "^4.9.5"
7146
},
72-
"packageManager": "pnpm@10.20.0",
47+
"packageManager": "pnpm@10.19.0",
7348
"engines": {
7449
"node": ">=18",
75-
"pnpm": "10.20.0"
50+
"pnpm": "10.19.0"
7651
}
7752
}

pnpm-lock.yaml

Lines changed: 9 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
packages:
2+
- .
3+
- website

tests/rspress/utils/_netlify.ts

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $, cd } from '../../../utils';
1+
import { $ } from '../../../utils';
22

33
interface DeployOptions {
44
alias?: string;
@@ -39,30 +39,21 @@ export async function deployPreviewToNetlify(options: DeployOptions) {
3939
console.log(`[rspress][netlify] Deploying with alias: ${alias}`);
4040

4141
const cliSpecifier = process.env.RSPRESS_NETLIFY_CLI ?? DEFAULT_NETLIFY_CLI;
42-
try {
43-
cd('../');
44-
const result =
45-
await $`pnpm --package=${cliSpecifier} dlx netlify deploy --dir=${outputDir} --alias=${alias} --message=${message} --site=${siteId} --auth=${authToken} --json --filter=website --no-build`;
42+
const result =
43+
await $`pnpm --package=${cliSpecifier} dlx netlify deploy --dir=${outputDir} --alias=${alias} --message=${message} --site=${siteId} --auth=${authToken} --json`;
4644

47-
try {
48-
const parsed = JSON.parse(result);
49-
const previewUrl =
50-
parsed?.deploy?.deploy_ssl_url ?? parsed?.deploy?.deploy_url;
51-
if (previewUrl) {
52-
console.log(
53-
`[rspress][netlify] Alias ${alias} preview url: ${previewUrl}`,
54-
);
55-
}
56-
} catch (error) {
45+
try {
46+
const parsed = JSON.parse(result);
47+
const previewUrl =
48+
parsed?.deploy?.deploy_ssl_url ?? parsed?.deploy?.deploy_url;
49+
if (previewUrl) {
5750
console.log(
58-
`[rspress][netlify] Unable to parse deploy response JSON: ${(error as Error).message}`,
51+
`[rspress][netlify] Alias ${alias} preview url: ${previewUrl}`,
5952
);
6053
}
6154
} catch (error) {
62-
console.error(
63-
`[rspress][netlify] Deploy failed for alias ${alias}:`,
64-
error,
55+
console.log(
56+
`[rspress][netlify] Unable to parse deploy response JSON: ${(error as Error).message}`,
6557
);
66-
throw error;
6758
}
6859
}

website/package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "ecosystem-ci-website",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"fetch:history": "node ./scripts/fetch-remote-history.mjs",
7+
"dev": "pnpm run fetch:history && rsbuild dev",
8+
"dev:mock": "cross-env RSBUILD_PUBLIC_DATA_SOURCE=mock pnpm run fetch:history && cross-env RSBUILD_PUBLIC_DATA_SOURCE=mock rsbuild dev",
9+
"dev:cached": "rsbuild dev",
10+
"build": "pnpm run fetch:history && rsbuild build",
11+
"preview": "rsbuild preview"
12+
},
13+
"dependencies": {
14+
"@fontsource/geist-sans": "^5.0.3",
15+
"@radix-ui/react-select": "^1.2.2",
16+
"@radix-ui/react-slot": "^1.1.0",
17+
"class-variance-authority": "^0.7.0",
18+
"clsx": "^2.0.0",
19+
"lucide-react": "^0.356.0",
20+
"react-router-dom": "^7.0.2",
21+
"react": "^18.3.1",
22+
"react-dom": "^18.3.1",
23+
"tailwind-merge": "^2.3.0",
24+
"tailwindcss-animate": "^1.0.7"
25+
},
26+
"devDependencies": {
27+
"@rsbuild/core": "^1.5.17",
28+
"@rsbuild/plugin-react": "^1.4.1",
29+
"@types/react": "^18.3.3",
30+
"@types/react-dom": "^18.3.0",
31+
"autoprefixer": "^10.4.19",
32+
"cross-env": "^7.0.3",
33+
"postcss": "^8.4.39",
34+
"tailwindcss": "^3.4.6",
35+
"typescript": "^5.5.4"
36+
}
37+
}

0 commit comments

Comments
 (0)