Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase max function ID length to 63 #3521

Merged
merged 3 commits into from
Jun 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/deploy/functions/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ export function functionsDirectoryExists(

/**
* Validate function names only contain letters, numbers, underscores, and hyphens
* and not exceed 62 characters in length.
* and not exceed 63 characters in length.
* @param functionNames Object containing function names as keys.
* @throws { FirebaseError } Function names must be valid.
*/
export function functionIdsAreValid(functions: { id: string }[]): void {
const validFunctionNameRegex = /^[a-zA-Z0-9_-]{1,62}$/;
const validFunctionNameRegex = /^[a-zA-Z0-9_-]{1,63}$/;
const invalidIds = functions.filter((fn) => !validFunctionNameRegex.test(fn.id));
if (invalidIds.length !== 0) {
const msg =
Expand Down