[BUG]: sf package version create always warns about org-capitalize-record-types, even when it's set
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, nodejs
- Área
- cli
Línea de trabajo
The cause sits in the dependency @salesforce/packaging: the settings generator is built at lib/package/packageVersionCreate.js:339 and packageConvert.js:185 without capitalizeRecordTypes. Read the ScratchOrgSettingsGenerator constructor in @salesforce/core (lib/org/scratchOrgSettingsGenerator.js:200), which warns when that option is undefined. Done when the org-capitalize-record-types value from ConfigAggregator is passed at both call sites and the warning no longer appears when the setting is set. The fix may belong in the packaging repository rather than this one.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Before You Submit
- I'm using the latest version of Salesforce CLI
- I've searched the existing issues
- I've run
sf doctorto diagnose common issues
Related Issue
No response
Command
sf package version create
Org Type
Developer Edition
Did this work before?
Yes, this is a regression
Last Working Version
No response
Summary
sf package version create prints this warning on every run:
Warning: Record types defined in the scratch org definition file will stop being capitalized by default in a future release.
Set the org-capitalize-record-types config var to true to enforce capitalization.
Setting the config var doesn't stop it, because package creation never reads the config var. The same happens when the definitionfile has no objectSettings or record types at all.
Repository to Reproduce
No response
Steps to reproduce
- sf config set org-capitalize-record-types=true (or set SF_CAPITALIZE_RECORD_TYPES=true)
- Use any scratch org definition file, even one with no objectSettings
- sf package version create -p -v -x -w 60
Expected Result
No warning when org-capitalize-record-types is set. The setting should also apply to how the build org is created, as it does for sf org create scratch.
Actual Result
The warning appears every time, and the setting is ignored. The build org always uses the hardcoded fallback (true).
System Information
- @salesforce/cli/2.152.14 win32-x64 node-v24.20.0
- @salesforce/plugin-packaging 3.0.7
- @salesforce/packaging 5.0.12
- @salesforce/core 9.2.0
- Windows 11, PowerShell 7
Additional Information
Cause
@salesforce/packaging creates the settings generator without passing the setting:
// @salesforce/packaging 5.0.12 — lib/package/packageVersionCreate.js:339
const settingsGenerator = new core_1.ScratchOrgSettingsGenerator({ asDirectory: true });
packageConvert.js:185 does the same thing. In @salesforce/core, the ScratchOrgSettingsGenerator constructor warns whenever capitalizeRecordTypes is undefined:
// @salesforce/core 9.2.0 — lib/org/scratchOrgSettingsGenerator.js:200
if (options?.capitalizeRecordTypes === undefined) {
void Lifecycle.getInstance().emitWarning(messages.getMessage('noCapitalizeRecordTypeConfigVar'));
this.capitalizeRecordTypes = true;
}
Suggested fix: in both packaging call sites, read org-capitalize-record-types from the ConfigAggregator and pass it as capitalizeRecordTypes, the same way scratch org creation does.
Related: #2633 introduced the config var; #2970 shows the warning in an unrelated package version create report.
Screenshots or Log Files
No response
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 571
- Forks
- 80
- Merge medio
- 23 h 43 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de forcedotcom/cli
-
sf agent mcp asset replace --assets null throws raw TypeError instead of InvalidShapePosiblemente ocupada @konkonrong-lgtm la tomó hace 70 días. Abiertoarea:afdx bug investigating owned by another team validated
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
forcedotcom/cli#3625 · 4 comentarios ·
-
area:afdx bug owned by another team
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
forcedotcom/cli#3608 · 2 comentarios ·
-
bug investigating validated
Dificultad 3/5 1-2 días Aptitud para principiantes 66/100
forcedotcom/cli#3667 · 5 comentarios ·
-
[BUG]: NavigationMenu SourceMember name mismatch prevents source-tracked retrieve from completingAbiertobug investigating validated
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
forcedotcom/cli#3660 · 3 comentarios ·
-
announcement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
forcedotcom/cli#3658 · 1 reacción ·
Todos los issues de forcedotcom/cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
usage: a custom provider's balance meters ("…%" in the balance path) ignore the Left/Used switchAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Negative subscript on a sparse array counts from the number of elements, not from the highest indexAbiertoarea: compat bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
reubeno/brush#1570 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ericcornelissen/depreman#591 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 2 días