[PR #159] [MERGED] fix: lowercase package name before sanitizing Worker name #359

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

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/159
Author: @StringerBell69
Created: 2/27/2026
Status: Merged
Merged: 3/3/2026
Merged by: @southpolesteve

Base: mainHead: fix/deploy-name-sanitization


📝 Commits (2)

  • e04a914 fix: lowercase package name before sanitizing Worker name
  • 3ac7ea3 test: assert exact sanitized project name value

📊 Changes

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

View changed files

📝 packages/vinext/src/deploy.ts (+1 -0)
📝 tests/deploy.test.ts (+1 -2)

📄 Description

Problem:
The project name sanitization in deploy.ts replaces characters not matching [a-z0-9-] with hyphens, but doesn't lowercase the name first. This causes uppercase letters to be replaced with hyphens, so a name like "restaurant-SABORES DE PORTUGAL" becomes "restaurant" instead of "restaurant-sabores-de-portugal".

Fix: Add .toLowerCase() before the regex replacement so uppercase letters are preserved as lowercase.


🔄 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/159 **Author:** [@StringerBell69](https://github.com/StringerBell69) **Created:** 2/27/2026 **Status:** ✅ Merged **Merged:** 3/3/2026 **Merged by:** [@southpolesteve](https://github.com/southpolesteve) **Base:** `main` ← **Head:** `fix/deploy-name-sanitization` --- ### 📝 Commits (2) - [`e04a914`](https://github.com/cloudflare/vinext/commit/e04a9145d997fb9ba3beb2a4de52c2cb8c59f127) fix: lowercase package name before sanitizing Worker name - [`3ac7ea3`](https://github.com/cloudflare/vinext/commit/3ac7ea3a6e8a4b39dfbfeead00fbec58fde06ca1) test: assert exact sanitized project name value ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/deploy.ts` (+1 -0) 📝 `tests/deploy.test.ts` (+1 -2) </details> ### 📄 Description Problem: The project name sanitization in deploy.ts replaces characters not matching [a-z0-9-] with hyphens, but doesn't lowercase the name first. This causes uppercase letters to be replaced with hyphens, so a name like "restaurant-SABORES DE PORTUGAL" becomes "restaurant" instead of "restaurant-sabores-de-portugal". Fix: Add .toLowerCase() before the regex replacement so uppercase letters are preserved as lowercase. --- <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:24 +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#359
No description provided.