Org-dependent packages
The other type of unlocked package that Salesforce provides, org-dependent packages, tackles the problem of dependencies by deferring compilation and validation of your changes until installation time. This means that these dependencies don’t necessarily need to be in your development org or in your source control for you to build the package – you can depend on metadata that exists in the target org.
This type of unlocked package is ideal for Salesforce orgs that are large, complex, and have been in use for a long time and thus have accumulated a lot of changes. Unpicking these changes into separate modules is lengthy, challenging work, but by having a package type that is able to depend on unpackaged metadata in the target org, you can defer (or even avoid) the need to refactor your entire org.
Creating an org-dependent package is incredibly simple, too – the command is the same as that for creating an unlocked package, but with the...