[PR #153] [CLOSED] fix(tests): avoid Function constructor in codegen parity tests #352

Closed
opened 2026-05-06 12:39:22 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/153
Author: @NathanDrake2406
Created: 2/27/2026
Status: Closed

Base: mainHead: codex/fix-lint-no-implied-eval


📝 Commits (1)

  • 0dc06fa fix(tests): avoid Function constructor in codegen parity tests

📊 Changes

1 file changed (+16 additions, -6 deletions)

View changed files

📝 tests/shims.test.ts (+16 -6)

📄 Description

Summary

  • replace new Function(...) usage in middleware codegen parity tests with runInNewContext from node:vm
  • preserve existing behavior assertions while removing no-implied-eval warnings

Verification

  • pnpm run lint
  • pnpm test tests/shims.test.ts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/153 **Author:** [@NathanDrake2406](https://github.com/NathanDrake2406) **Created:** 2/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/fix-lint-no-implied-eval` --- ### 📝 Commits (1) - [`0dc06fa`](https://github.com/cloudflare/vinext/commit/0dc06fa033736010276f427420472d00e6781f52) fix(tests): avoid Function constructor in codegen parity tests ### 📊 Changes **1 file changed** (+16 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `tests/shims.test.ts` (+16 -6) </details> ### 📄 Description ## Summary - replace `new Function(...)` usage in middleware codegen parity tests with `runInNewContext` from `node:vm` - preserve existing behavior assertions while removing `no-implied-eval` warnings ## Verification - pnpm run lint - pnpm test tests/shims.test.ts --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:39:22 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#352
No description provided.