Skip to content
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

sfdx force:project:create generates a project with an unexpected sourceAPIVersion in the sfdx-project.json #1939

Closed
ganesh2109-cloud opened this issue Feb 15, 2023 · 5 comments
Labels
feature Issue or pull request for a new feature

Comments

@ganesh2109-cloud
Copy link

Summary

sfdx force:project:create generates a project with a sfdx-project.json sourceAPIVersion which is hardcoded in @salesforce/templates/package.json

Steps To Reproduce:

sfdx config:set apiVersion=57.0 -g
sfdx force:project:create

Expected result

The sourceAPIVersion in sfdx-project.json should be 57.0
The sourceApiVersion in the sfdx-project.json should get the value from the sfdx-config.json first, if not defined there it should take the default value as it is now.

Actual result

It is always taken from the hardcoded "version" attribute in an internal @salesforce/templates/package.json

System Information

{
"cliVersion": "sfdx-cli/7.187.1",
"architecture": "win32-x64",
"nodeVersion": "node-v18.1.0",
"pluginVersions": [
"@oclif/plugin-autocomplete 1.4.4 (core)",
"@oclif/plugin-commands 2.2.5 (core)",
"@oclif/plugin-help 5.2.2 (core)",
"@oclif/plugin-not-found 2.3.17 (core)",
"@oclif/plugin-plugins 2.3.0 (core)",
"@oclif/plugin-search 0.0.11 (core)",
"@oclif/plugin-update 3.1.1 (core)",
"@oclif/plugin-version 1.2.1 (core)",
"@oclif/plugin-warn-if-update-available 2.0.24 (core)",
"@oclif/plugin-which 2.2.12 (core)",
"alias 2.2.0 (core)",
"apex 1.5.0 (core)",
"auth 2.4.0 (core)",
"community 2.2.0 (core)",
"config 1.5.0 (core)",
"custom-metadata 2.1.0 (core)",
"data 2.2.0 (core)",
"generator 2.0.17 (core)",
"info 2.4.0 (core)",
"limits 2.3.0 (core)",
"org 2.3.0 (core)",
"packaging 1.14.1 (core)",
"schema 2.3.0 (core)",
"signups 1.4.0 (core)",
"source 2.4.1 (core)",
"telemetry 2.1.0 (core)",
"templates 55.3.0 (core)",
"trust 2.4.0 (core)",
"user 2.3.0 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
"salesforce-alm 54.8.5 (core)"
],
"osVersion": "Windows_NT 10.0.19044",
"shell": "cmd.exe",
"rootPath": "C:\Users\M65F134\Downloads\node-v18.1.0-win-x64\node_modules\sfdx-cli"
}

Additional information

The same erroneous behavior is also in the latest-rc version: 7.188.1

@ganesh2109-cloud ganesh2109-cloud added the investigating We're actively investigating this issue label Feb 15, 2023
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@mshanemc mshanemc added feature Issue or pull request for a new feature and removed investigating We're actively investigating this issue labels Feb 15, 2023
@github-actions
Copy link

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

@git2gus
Copy link

git2gus bot commented Feb 15, 2023

This issue has been linked to a new work item: W-12551179

@mshanemc
Copy link
Contributor

mshanemc commented Feb 15, 2023

I agree that's how it should work (it should use an --api-version flag that respects the config value like many other commands do).

@shetzel
Copy link
Contributor

shetzel commented Jul 6, 2023

This is now in the latest CLI, 7.208.10

@shetzel shetzel closed this as completed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue or pull request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants