Commit Graph

4 Commits

Author SHA1 Message Date
btea
f6dde6246f ci: skip ecosystem-e2e on forks (#12541) 2026-06-20 20:18:47 +02:00
Zoltan Kochan
fc2f33912e refactor: move the TypeScript pnpm CLI into a pnpm11/ directory (#12537)
The TypeScript pnpm CLI freezes at v11; pnpm 12 will be the Rust pacquet
port. To make that split legible, all TypeScript source, test, and build
directories move under a new top-level pnpm11/ directory. The name states
the version boundary rather than implying a behavioral fork, since the two
stacks are meant to behave identically.

Scope is source-only: the shared workspace root stays at the repo root.
pnpm-workspace.yaml, package.json, pnpm-lock.yaml, .pnpmfile.cjs,
.meta-updater, __patches__, .changeset, .husky, and the lint/spell configs
remain in place, so one pnpm workspace and one Cargo workspace still span
all three products. pnpr/client and pacquet/tasks/registry-mock stay as
cross-product workspace members.

Rewiring the move required:
- pnpm-workspace.yaml globs prefixed with pnpm11/
- root package.json script paths, eslint.config.mjs, tsconfig.lint.json,
  .gitignore, and CODEOWNERS updated
- .meta-updater/src/index.ts literals repointed (pnpm11/pnpm/package.json,
  pnpm11/__utils__, pnpm11/__typings__, and the main package directory)
- regenerated every moved package's repository/homepage URL via meta-updater
- pnpm11/pnpm/bundle-deps.ts and __utils__/scripts/src/typecheck-only.ts
  climb one more level to reach the repo root

.meta-updater stays at the repo root because @pnpm/meta-updater resolves
its config at <cwd>/.meta-updater/main.mjs.

TS CI (.github/workflows/ci.yml) now only runs when pnpm11/-relevant paths
change, via a dorny/paths-filter changes job plus a TS CI / Success
aggregate gate; branch protection should require only that gate.
2026-06-20 14:36:25 +02:00
Zoltan Kochan
48359ad213 fix(ecosystem-e2e): absolute /bin/sh for build, build binaries once in CI (#12440)
* fix(ecosystem-e2e): run the build script via absolute /bin/sh

The build stage sets the child PATH to prepend the project's
node_modules/.bin, and Rust resolves a bare program name against that child
PATH. Spawning `sh` therefore let a dependency-installed `.bin/sh` run in
place of the system shell — running unintended code and masking build
pass/fail. Use the absolute `/bin/sh` so the orchestrating shell is always
the system one; the script it runs still finds framework bins through the
prepended PATH.

* ci(ecosystem-e2e): build pnpm and pacquet once, share via artifacts

The stack matrix rebuilt the pacquet release binary and the pnpm bundle in
every one of its seven jobs. Add a single build job that compiles pacquet,
the harness, and the pnpm bundle once and uploads them as an artifact; the
per-stack jobs download it and run, so the multi-minute Rust and bundle
builds happen once per run instead of seven times.
2026-06-16 08:56:19 +02:00
Zoltan Kochan
70f1343d9a feat(ecosystem-e2e): ecosystem test harness across pnpm/pacquet and node_modules layouts (#12439)
* feat(ecosystem-e2e): add harness installing real JS stacks across pnpm/pacquet and layouts

Adds `pacquet/tasks/ecosystem-e2e`, a Yarn-PnP-style ecosystem test that
installs, builds, and serves real framework scaffolds (Next.js, Vite,
Angular, Astro, SvelteKit, Nuxt, React Router 7) across the cross product
of {pnpm, pacquet} x {isolated, global virtual store}.

The binary axis catches pnpm/pacquet parity gaps; the layout axis catches
breakage introduced by the global virtual store. Each cell scaffolds the
project once, installs with the binary under test, runs the build, then
boots the production server and probes it over HTTP — so a green cell means
the produced node_modules works at runtime, not just at bundle time.

Runs on a daily cron (one job per stack), not per-PR: the installs are slow
and track upstream framework releases, so a red cell is investigated rather
than treated as a merge blocker.

* style(ecosystem-e2e): use ASCII ellipsis in comments for dylint

* fix(ecosystem-e2e): address PR review findings

- workflow: wrap `pnpm/bin/pnpm.cjs` for the `--pnpm` shim; the built bundle
  is `dist/pnpm.mjs`, so the previous `dist/pnpm.cjs` path never existed and
  the shim would have failed to launch the repo-built pnpm.
- keep: `--keep` now reuses an already-scaffolded template instead of
  re-running the generator into a non-empty directory (which fails).
- serve: retry HTTP 4xx/5xx until the deadline rather than failing on the
  first one — dev servers can briefly answer error statuses while warming up.
- serve: the probe reads only the status line, not the whole response body.
- stacks: pin the create-astro, sv, nuxi, and create-react-router generators
  to a major version instead of tracking the latest tag, matching the stated
  reproducibility intent for the scheduled run.

* fix(ecosystem-e2e): scrub subprocess env, bound CI job, fix README fence

- security: scaffold/install/build/serve run third-party lifecycle code, so
  they now launch via `sandboxed_command`, which clears the inherited
  environment down to a small allowlist (PATH, HOME, proxy/cert/locale vars,
  plus PORT/HOST for servers). An unattended dependency build script can no
  longer read ambient CI secrets such as the workflow token.
- workflow: add a 60-minute job timeout so a hung build or serve subprocess
  can't pin a runner indefinitely.
- docs: give the README's grid code block a language identifier (MD040).

* fix(ecosystem-e2e): spawn serve argv directly and reset cell log per run

- serve: run the tokenized serve command directly off the project's
  node_modules/.bin instead of joining tokens into a `sh -c` string, so
  argument boundaries survive and a token that needs quoting can't break the
  launch. The spawned PID is the server itself, so teardown still works.
- log: truncate cell.log at the start of each run so reruns (notably under
  --keep) don't interleave with stale output.
2026-06-16 08:15:28 +02:00