Skip to content

test: replace require('fs') with ESM import to restore lint budget (CI) - #4068

Merged
ety001 merged 1 commit into
nextfrom
fix/lint-budget-proxy-require
Oct 23, 2026
Merged

ety001 merged 1 commit into
nextfrom
fix/lint-budget-proxy-require

Conversation

@ety001

@ety001 ety001 commented Oct 23, 2026

Copy link
Copy Markdown
Member

Problem

PR #4061 introduced a no-require-imports ESLint error in __tests__/proxy.test.ts:383 (require('fs') in the ANONYMOUS_PAGE_CACHE_CONTROL freeze test). The lint budget gate (pnpm lint:ci, scripts/lint-budget.mjs) enforces 0 errors, so next CI has been red since 4871d97c — predating the 2026-09-29 audit-fix batch (#4063-#4067), which kept lint exactly at baseline.

Fix

Switch require('fs') to a static import { readFileSync } from 'node:fs'. No behavior change.

Verification

  • pnpm lint:ci: lint ok: 0 errors <= budget 0
  • __tests__/proxy.test.ts: 116/116 pass
  • Full suite verified in CI

PR #4061 introduced a no-require-imports error in __tests__/proxy.test.ts which exceeds the zero-error lint budget and keeps next's CI red. Switch to a static node:fs import; no behavior change.
@ety001
ety001 merged commit 8aff7b4 into next Oct 23, 2026
1 of 2 checks passed
@ety001
ety001 deleted the fix/lint-budget-proxy-require branch October 23, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant