Skip to content

Commit

Permalink
Increase max function ID length to 63 (firebase#3521)
Browse files Browse the repository at this point in the history
  • Loading branch information
inlined authored and devpeerapong committed Dec 14, 2021
1 parent bab64f4 commit 5a567f1
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 5a567f1

Please sign in to comment.