From 3298686d4d36c7db09ddfe79c5c2d4c427b170ab Mon Sep 17 00:00:00 2001 From: Navin Chandra Date: Thu, 12 Sep 2024 13:41:17 +0530 Subject: [PATCH 1/2] convert to BIG_SNAKE_CASE --- javascript/private/gen_file.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/javascript/private/gen_file.py b/javascript/private/gen_file.py index 42d6d520185b5..4deef7f22201e 100644 --- a/javascript/private/gen_file.py +++ b/javascript/private/gen_file.py @@ -1,5 +1,6 @@ import os import sys +import re _copyright = """/* * Copyright 2011-2014 Software Freedom Conservancy @@ -19,9 +20,11 @@ """ def get_atom_name(name): - # TODO: Convert camelCase and snake_case to BIG_SNAKE_CASE + # Convert camelCase and snake_case to BIG_SNAKE_CASE name = os.path.basename(name) - return name.upper() + name = re.sub(r'(? Date: Thu, 12 Sep 2024 14:58:08 +0530 Subject: [PATCH 2/2] update regex to handle more cases --- javascript/private/gen_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/private/gen_file.py b/javascript/private/gen_file.py index 4deef7f22201e..f1afda1459608 100644 --- a/javascript/private/gen_file.py +++ b/javascript/private/gen_file.py @@ -22,7 +22,7 @@ def get_atom_name(name): # Convert camelCase and snake_case to BIG_SNAKE_CASE name = os.path.basename(name) - name = re.sub(r'(?