sfdx force\:package\:beta\:version\:create is breaking the sfdx-project.json file convention
See original GitHub issueSummary
Using new package beta command & seeing bug (or at least undocumented breaking changes).
Steps To Reproduce:
- Create a new unlock package version
- See that the dependencies in the sfdx project.json is updated with a new format (not documented)
Expected result
package version:package version id
Actual result
There is now a subscriberPackageVersionId:[packageVersionId] format that is breaking our CI chain.
System Information
{
"cliVersion": "sfdx-cli/7.172.0",
"architecture": "linux-x64",
"nodeVersion": "node-v16.17.1",
"pluginVersions": [
"@oclif/plugin-autocomplete 1.3.3 (core)",
"@oclif/plugin-commands 2.2.0 (core)",
"@oclif/plugin-help 5.1.15 (core)",
"@oclif/plugin-not-found 2.3.5 (core)",
"@oclif/plugin-plugins 2.1.4 (core)",
"@oclif/plugin-update 3.0.2 (core)",
"@oclif/plugin-version 1.1.3 (core)",
"@oclif/plugin-warn-if-update-available 2.0.9 (core)",
"@oclif/plugin-which 2.1.1 (core)",
"alias 2.1.5 (core)",
"apex 1.2.0 (core)",
"auth 2.2.13 (core)",
"community 2.0.3 (core)",
"config 1.4.21 (core)",
"custom-metadata 2.0.1 (core)",
"data 2.1.4 (core)",
"generator 2.0.5 (core)",
"info 2.1.9 (core)",
"limits 2.0.5 (core)",
"org 2.2.7 (core)",
"packaging 1.9.4 (core)",
"schema 2.1.10 (core)",
"signups 1.2.7 (core)",
"source 2.0.17 (core)",
"telemetry 2.0.2 (core)",
"templates 55.1.0 (core)",
"trust 2.1.0 (core)",
"user 2.1.10 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
"salesforce-alm [54](https://github.com/WorldlineSMI/sf-ps-arrow/actions/runs/3281841792/jobs/5404414163#step:5:55).8.1 (core)"
],
"osVersion": "Linux 5.15.0-1020-azure",
"shell": "unknown",
"rootPath": "/home/runner/pnpm-global/5/node_modules/.pnpm/sfdx-cli@7.1[72](https://github.com/WorldlineSMI/sf-ps-arrow/actions/runs/3281841792/jobs/5404414163#step:5:73).0/node_modules/sfdx-cli"
}
- Which shell/terminal are you using? (e.g. bash, zsh, powershell 5, powershell 7, cmd.exe, etc.) bash
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Generate sfdx-project.json - Salesforce Stack Exchange
My error is like : ERROR running force:package:version:create: The package MyPackageName isn't defined in the sfdx-project.json file. Add it ...
Read more >Salesforce DX Project Configuration - Salesforce Developers
The project configuration file sfdx-project.json indicates that the directory is a Salesforce DX project. The configuration file contains project ...
Read more >How I set up VSCode for a new Salesforce project - Katie Kodes
Folder creation; Folder tracking with Git; VSCode setup; First Git commit; SFDX configuration files; SFDX global authentication and aliasing ...
Read more >Most Frequently used SFDX Commands – Home - Jitendra Zaa
Retrieve and Deploy code in Sandbox using SFDX – Old File Format ... In above command, –rootdir would be replaced by root path...
Read more >Make the most of your DX projects with the built-in Node.js ...
The standard project template contains a package. json file which is a Node.js project descriptor that help you enhance your developer ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@WillieRuemmele we are facing this issue as well with the new commands.
Did you ensure that the dreamhouse-lwc project has a dependency on another package before you create the package version?
Here is an illustration of what the file looks like before and after using the beta package version create command.
Before
After
Somewhat of a separate issue. After the version is created, the VS Code extensions also complain about the dependency missing a package name after the dependency section is re-written. Although referring to a dependency that way seems to be perfectly valid.
Thank you @mrichbb - I have a fix ready for review 👍