What’s the main differences between unlocked & unmanaged packages?
As for me, the most important difference is that the unlocked package uses SFDX for development. So you, as a developer, could create a package, create a new version, promote, install to org within only SFDX. So it is possible to script all required actions, so that automate the process and use CI in the development of the package.
- 2-nd generation package
- requires enabled DevHub and Packaging feature on DevHub on an org
- uses SFDX and all its powerful instruments for development (like
sfdx force:source:pullCLI commands)
- source of truth is your version control system
- uses scratch orgs for development
- can have dependencies on other 2-nd gen packages
- first-generation package
- commonly uses Metadata API to develop components of the package
- source of truth is a developer org
- you need to manually add components to a package, upload new version from dev org by means of UI