test: enable deployment coverage for monorepo fixtures (#99395)
## Summary
Enable deployment coverage for `import-meta-glob-monorepo` and
`non-root-project-monorepo`. Both apps build under `apps/web`, so
configure Vercel's output directory accordingly and enable Corepack to
use the declared pnpm version for workspace installation and builds.
Match `import.meta.url` against the exact source-file URL for the build
environment, retaining the filename and percent-encoding assertions and
Windows Turbopack path canonicalization.
This is the third layer of the deployment test flag stack, based on
#99534 (which depends on #99533). Both nested configs are prepared with
`patchFileWithDeployEnvAssignments()`, which wraps `PatchedFileRef`,
checks the resolved harness mode, and uses the shared
`getDeploymentTestEnvAssignments()` helper. They capture the same static
experimental flag list as the root harness, including partial
prefetching. Source configs stay free of deployment aliases. Automatic
nested-config discovery remains outside this stack.
Dependency versions, assertions, and unrelated bundler/dev-mode
restrictions are preserved. #99407 is not part of this stack.
## Verification
- Full bootstrap: 18/18 tasks passed. Repository TypeScript checking,
formatting, and ESLint passed.
- Shared helper and existing deployment lifecycle unit tests: 41/41
passed, covering enabled/disabled values, missing and empty values,
escaping, and capture timing.
- Focused local production Turbopack tests: 11/11 passed across both
monorepo suites.
- Real Vercel deployments against `16.4.0-canary.55`: the larger
monorepo suite passed 10/10 assertions with flags unset and 10/10 with
Cache Components, partial prefetching, and cached navigations enabled.
Enabled remote logs confirmed Cache Components and cached navigations.
- The glob suite passed its assertion in both normal and enabled modes
on targeted retries. Both monorepo suites therefore passed 11/11
assertions per mode across four successful real deployments. The enabled
glob build also reported Cache Components and cached navigations.
Initial glob attempts failed before assertions due to Vercel transport
errors during project linking and CLI installation; no test changes were
made for the retries.
### Follow-up helper validation
- `patchFileWithDeployEnvAssignments()` now appends captured assignments
after a newline in deploy mode, matching the root harness. Dev/start
modes preserve the file content unchanged.
- 41/41 unit tests, 11/11 local production assertions, and the glob
suite's dev assertion passed. Full bootstrap (18/18), TypeScript,
formatting, and ESLint passed.
- A fresh feature-enabled deployment of the larger monorepo suite
installed and enabled the feature flags, but passed 8/10 assertions: the
two encoded server source URLs used `/var/task/` instead of the asserted
`/vercel/path0/`. Assertions are preserved; this deployment is not
recorded as a suite pass. The feature-enabled glob deployment passed its
assertion. Overall deploy result: 9 passed, 2 failed.
- Append-placement follow-up: 10 standalone VM behavior checks passed
using the actual helper, mode declaration, and assignment generator,
including dev/start preservation and deploy files ending without a
newline or with a line comment. The 41 unit tests, full bootstrap
(18/18), repository TypeScript, formatting, and ESLint also passed.
Deployment tests were not rerun for this placement change; the
source-URL failures above remain unresolved.
<!-- NEXT_JS_LLM -->