So, A and B are packages (but also Unity projects), and C is a project. It’s the end project. So it doesn’t have a package.json of its own.
Here is the package.json for package A (I call it dependencypackageproject)
{
"name": "com.company.dependencypackageproject",
"displayName": "Some Company Unity Dependency Test Package",
"version": "0.1.218",
"unity": "2019.4",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris interdum, nibh vitae tempus lacinia, turpis ante venenatis urna, quis vulputate dui lacus varius arcu. Suspendisse commodo maximus efficitur. Cras bibendum venenatis posuere. Praesent suscipit enim in erat facilisis consectetur. Quisque semper elementum sapien, vitae dictum ipsum vulputate non. Aenean aliquam orci enim, in venenatis quam sollicitudin nec. Nullam scelerisque lectus sit amet ornare hendrerit. Donec nec nisi in velit pellentesque iaculis a ut dolor.",
"dependencies:": {
"com.unity.vectorgraphics": "2.0.0-preview.12"
},
"publishConfig": {
"registry": "http://artifactory.ops.aws.company.net/artifactory/api/npm/unity_packages"
},
"scopes": [
"com.company"
],
"timestamp": 1602778929211,
"timestamp_readable": "Thu, 15 Oct 2020 16:22:09 GMT"
}
Here is the package.json for the package B (i call it testpackageproject)
{
"name": "com.company.testpackageproject",
"displayName": "Some Company Unity Test Package",
"version": "0.0.27",
"unity": "2019.4",
"description": "Some Company test package.",
"dependencies:": {
"com.company.dependencypackageproject": "0.1.218",
"com.unity.vectorgraphics": "2.0.0-preview.12"
},
"devDependencies:": {
"com.company.dependencypackageproject": "0.1.218",
"com.unity.vectorgraphics": "2.0.0-preview.12"
},
"publishConfig": {
"registry": "http://artifactory.ops.aws.company.net/artifactory/api/npm/unity_packages"
},
"scopes": [
"com.company"
],
"timestamp": 1602779095826,
"timestamp_readable": "Thu, 15 Oct 2020 16:24:55 GMT"
}
And the manifest for C is above. I hope this helps.
I should mention that I am using 2019.4 for our development, but for testing these things I tried also 2020.1.7. If this only works with 2020, I am ok with upgrading. We are not that far into our development, so i think it’s fairly safe.