Skip to content

Commit

Permalink
Move camelcase to devDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Apr 15, 2024
1 parent 5189a15 commit 154a302
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/lib/core-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
"@types/pretty-hrtime": "^1.0.0",
"@types/semver": "^7.3.4",
"better-opn": "^3.0.2",
"camelcase": "^8.0.0",
"chalk": "^4.1.0",
"cjs-module-lexer": "^1.2.3",
"cli-table3": "^0.6.1",
Expand Down Expand Up @@ -109,6 +108,7 @@
"@types/node-fetch": "^2.5.7",
"@types/ws": "^8",
"boxen": "^7.1.1",
"camelcase": "^8.0.0",
"node-fetch": "^3.3.1",
"slash": "^5.0.0",
"typescript": "^5.3.2"
Expand Down
4 changes: 2 additions & 2 deletions code/lib/core-server/src/utils/get-component-variable-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* @returns A valid variable name.
*/
export const getComponentVariableName = async (name: string) => {
const camelCase = (await import('camelcase')).default;
const camelCased = camelCase(name.replace(/^[^a-zA-Z_$]*/, ''), { pascalCase: true });
const camelCase = await import('camelcase');
const camelCased = camelCase.default(name.replace(/^[^a-zA-Z_$]*/, ''), { pascalCase: true });
const sanitized = camelCased.replace(/[^a-zA-Z_$]+/, '');
return sanitized;
};
2 changes: 2 additions & 0 deletions code/ui/manager/src/globals/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ export default {
'CHANNEL_CREATED',
'CHANNEL_WS_DISCONNECT',
'CONFIG_ERROR',
'CREATE_NEW_STORYFILE',
'CREATE_NEW_STORYFILE_RESULT',
'CURRENT_STORY_WAS_SET',
'DOCS_PREPARED',
'DOCS_RENDERED',
Expand Down

0 comments on commit 154a302

Please sign in to comment.