-
Notifications
You must be signed in to change notification settings - Fork 4
Revert "fix: match variable aliases using transformed constant names" #542
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,9 @@ import { fetchAllVariables } from '../../api/variables' | |
| import { Flags } from '@oclif/core' | ||
| import { Feature, Project, Variable, CustomProperty } from '../../api/schemas' | ||
| import { OrganizationMember, fetchOrganizationMembers } from '../../api/members' | ||
| import { upperCase } from 'lodash' | ||
| import { createHash } from 'crypto' | ||
| import path from 'path' | ||
| import { keyToConstant } from '../../utils/keyToConstant' | ||
| import { | ||
| fetchAllCompletedOrArchivedFeatures, | ||
| fetchFeatures, | ||
|
|
@@ -353,7 +353,7 @@ export const ${constantName} = '${hashedKey}' as const` | |
| } | ||
|
|
||
| getVariableGeneratedName(variable: Variable) { | ||
| let constantName = keyToConstant(variable.key) | ||
| let constantName = upperCase(variable.key).replace(/\s/g, '_') | ||
|
||
|
|
||
| if (this.methodNames[constantName]?.length) { | ||
| constantName = `${constantName}_${this.methodNames[constantName].length}` | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the
keyToConstanttransformation fallback means that aliases must now match exactly. Consider documenting this behavior change in the codebase or user-facing documentation to help users understand that the generated constant names from the types file must be used directly, without any automatic kebab-case transformation.