Skip to content

fix(editor): build the example plugin before the e2e run and stop pnpm examples following symlinks - #376

Open
Exeloo wants to merge 3 commits into
mainfrom
fix/tooling-scripts
Open

Exeloo wants to merge 3 commits into
mainfrom
fix/tooling-scripts

Conversation

@Exeloo

@Exeloo Exeloo commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Closes #237
Closes #297
Refs #224

Two fixes in the dev tooling scripts:

  • marketplace e2e fails on a fresh worktree: tooling/example-plugin is not built #237, e2e on a fresh worktree (apps/editor/e2e/prepare-workspace.mjs): the example plugin (tooling/example-plugin, the dev plugin of every e2e run) is not in the editor build filter, so a fresh worktree had no dist and the marketplace e2e failed. The e2e prep now builds it at the start of each run, after the example theme. Both builds send their errors to the terminal (stdio: ['ignore', 'ignore', 'inherit']), so a failing build says why.
  • pnpm examples follows symlinks out of a game and can replace .examples/.data #297, pnpm examples (scripts/examples.mjs): the copy no longer follows symlinks (they are left out with a warning: skipped symlink <path>, or Skipped <group>/<name>: a symlink. for a game folder), and hidden folders are never taken as games, so no copy can replace .examples/.data, the data folder of pnpm example.
-    dereference: true,
-    filter: (path) => !SKIPPED.has(basename(path)),
+    filter: (path) => {
+      if (SKIPPED.has(basename(path))) return false;
+      if (!lstatSync(path).isSymbolicLink()) return true;
+      console.warn(`  skipped symlink ${path.slice(example.path.length + 1)}`);
+      return false;
+    },

AGENTS.md is updated for both (what pnpm examples leaves out; the e2e prep builds the example plugin).

#224 (knip failed once in pnpm lint) stays open: a possible cause was reproduced (knip running during a vite-plugin rebuild), but this PR changes nothing for it.

How do you test this PR?

Commands run from the worktree on 5940fa7:

Check Result
The #297 repro steps, run again exit 0; skipped symlink linked; .examples/.data untouched
A basics/linkedgame symlink next to a real basics/real game prints Skipped basics/linkedgame: a symlink.; only real is copied
Marketplace e2e (needs the example plugin, #237) 2 passed, 0 skipped, 0 failed
prettier --check on both scripts pass
pnpm lint pass

Not rerun after 5940fa7: pnpm build, pnpm typecheck, the unit tests (the commit only touches two .mjs scripts). A red run of #237 and #297 on main is not recorded.

Integration: a scratch branch with every editor branch of this sweep merged passed pnpm build, lint, typecheck, pnpm test --force (1014 passed, 1 skipped) and the full e2e suite with the engine (141/141, Chromium only).

Merge danger

  • Two-way door (a revert is enough). Dev scripts and the e2e prep only: nothing ships in the editor app or a package. Merging to main still deploys the editor app.
  • The e2e prep now runs pnpm run build in tooling/example-plugin on every run, which adds that build's time to each e2e start.
  • AGENTS.md: fix/server-core-fs-safety and fix/project-fs-sync also add text there (fix/project-fs-sync adds a bullet right after the "after changing a plugin manifest" line this branch edits). Keep both texts.

Follow-up issues

None filed.

Quality gate

Small gate: one reviewer covering every lane.

Lane Result HEAD covered
Docs Pass (AGENTS.md updated) 9a06a9b
Correctness Pass (2 Minors: silent build errors, silent skip of a symlinked game; fixed in 5940fa7) 9a06a9b
Performance Pass 9a06a9b
Accessibility Pass (no UI) 9a06a9b
Security Pass 9a06a9b
Style Pass 9a06a9b

Last round 5940fa7 (the two Minors): producer checks above, not re-reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps:editor Related to Editor app

Projects

None yet

1 participant