Skip to content

fix: lowercase package name before sanitizing Worker name#159

Open
StringerBell69 wants to merge 1 commit intocloudflare:mainfrom
StringerBell69:fix/deploy-name-sanitization
Open

fix: lowercase package name before sanitizing Worker name#159
StringerBell69 wants to merge 1 commit intocloudflare:mainfrom
StringerBell69:fix/deploy-name-sanitization

Conversation

@StringerBell69
Copy link
Contributor

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.

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