test: extract a shared helper for deployment feature flags (#99533)
## Summary Extract the root deploy harness's Cache Components flag capture into a dependency-free helper that can also be used when preparing nested app configs. The helper owns a static flag list and emits locally captured JavaScript assignments; it requires no import from the deployed fixture. The root config keeps its existing assignment position and behavior. ## Verification - Generated assignments were executed in isolated contexts to verify enabled/disabled values, missing and empty values, string escaping, capture timing, and unrelated environment preservation. Together with the existing deployment lifecycle tests: 27/27 unit tests passed. - A focused real Vercel deployment of `test/e2e/test-utils-tests/basic/basic.test.ts` passed against `16.4.0-canary.55` with `__NEXT_CACHE_COMPONENTS=true`. The remote build explicitly reported Cache Components enabled. - Full bootstrap (18/18 tasks), repository TypeScript checking, formatting, and ESLint passed. <!-- NEXT_JS_LLM -->
Showing
Please
register
or
sign in
to comment