-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
@nrwl/devkit names
function incorrectly converts PascalName to CONSTANT_NAME
#12681
Comments
also this files should be at the same level as schema.d.ts: export interface SchemaServiceWithFacade {
name: string;
path: string;
project?: string;
flat?: boolean;
} schema.json {
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"$id": "service-with-facade",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Library name",
"$default": {
"$source": "argv",
"index": 0
}
},
"path": {
"type": "string",
"format": "path",
"description": "The path at which to create the class, relative to the workspace root.",
"visible": false
},
"project": {
"type": "string",
"description": "The name of the project."
},
"flat": {
"type": "boolean"
}
},
"required": ["name", "path"]
}
|
name
function incorrectly converts PascalName to CONSTANT_NAMEnames
function incorrectly converts PascalName to CONSTANT_NAME
In Nx 12, 13 and 14
But in Nx 15.0.4 the behavior changes to:
This is a bug? |
Looks like yes, but |
One solution here is to just check if the provided name is all uppercase then treat it as lowercase for the transformations
Though it seems like this just wasn't intended to be used for constant names as the base for transformation, so might be better to just type check the input value.
|
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
if
InventoryGroupingTypes
passed, it becameExpected Behavior
name function should correctly convert
InventoryGroupingTypes
toINVENTORY_GROUPING_TYPES
Steps to Reproduce
index.ts
):files
folder with any file contains lines inCurrent Behavior
named...__tmpl__
Environment
The text was updated successfully, but these errors were encountered: