[PR #212] [MERGED] fix: use function form of glob exclude for Node < 22.14 compat #392

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

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/212
Author: @southpolesteve
Created: 3/1/2026
Status: Merged
Merged: 3/1/2026
Merged by: @southpolesteve

Base: mainHead: fix/glob-exclude-compat


📝 Commits (1)

  • fe8be96 fix: use function form of glob exclude for Node < 22.14 compat

📊 Changes

2 files changed (+5 additions, -3 deletions)

View changed files

📝 packages/vinext/src/routing/app-router.ts (+3 -2)
📝 packages/vinext/src/routing/pages-router.ts (+2 -1)

📄 Description

Summary

  • Switches exclude option on node:fs/promises glob from string arrays to function form in both app-router.ts and pages-router.ts
  • String arrays for exclude require Node >= 22.14.0, but engines allows >= 22. Users on 22.0.0-22.13.x get ERR_INVALID_ARG_TYPE at runtime.
  • The function form works on all Node >= 22.0.0

Extracted from #134 by @erayack.


🔄 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/212 **Author:** [@southpolesteve](https://github.com/southpolesteve) **Created:** 3/1/2026 **Status:** ✅ Merged **Merged:** 3/1/2026 **Merged by:** [@southpolesteve](https://github.com/southpolesteve) **Base:** `main` ← **Head:** `fix/glob-exclude-compat` --- ### 📝 Commits (1) - [`fe8be96`](https://github.com/cloudflare/vinext/commit/fe8be96c2c4749ccb86494ef9fc3aa71be4c5072) fix: use function form of glob exclude for Node < 22.14 compat ### 📊 Changes **2 files changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/routing/app-router.ts` (+3 -2) 📝 `packages/vinext/src/routing/pages-router.ts` (+2 -1) </details> ### 📄 Description ## Summary - Switches `exclude` option on `node:fs/promises` glob from string arrays to function form in both `app-router.ts` and `pages-router.ts` - String arrays for `exclude` require Node >= 22.14.0, but `engines` allows `>= 22`. Users on 22.0.0-22.13.x get `ERR_INVALID_ARG_TYPE` at runtime. - The function form works on all Node >= 22.0.0 Extracted from #134 by @erayack. --- <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:35 +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#392
No description provided.