Target a Specific Release for Your Unlocked Packages During Salesforce Release Transitions
During major Salesforce release transitions, you can specify preview or previous when
creating a package version. Specifying the release version for a package allows you to test
upcoming features, run regression tests, and support customers regardless of which Salesforce
release their org is on. Previously, you could only create package versions that matched the
Salesforce release your Dev Hub org was on.
To create a package version based on a preview or previous Salesforce release version, create
a scratch org definition file that includes either:
{
"release": "previous"
}
or
{
"release": "preview"
}
In the sfdx-project.json file, set the sourceApiVersion to correspond with the release version of the package version you’re creating. If you are targeting a previous release, any sourceApiVersion value below the current release is accepted.
Then when you create your package version, specify the scratch org definition
file.
sf package version create --package pkgA --definition-file config/project-scratch-def.json
Preview start date is when sandbox instances are upgraded. Preview end date is when all instances are on the GA release.
Release Version | Preview Start Date | Preview End Date |
---|---|---|
Summer ’25 | May 11, 2025 | June 14, 2025 |
Winter ’26 | September 7, 2025 | October 11, 2025 |
Spring ’26 | January 11, 2026 | February 21, 2026 |