npm specifies its direct dependencies in package.json as well as other types of dependencies like peerDependencies, devDependencies, and optionalDependencies, and so it should serve as the primary source of truth for what a package's dependencies are. Otherwise you end up needing to manually keep this information in sync with .changes/config.json in order have correct behavior.
I've already run afoul of this twice in @simulacrum where I thought that changing a dependency would be reflected in the publishing result.
{
"@simulacrum/server": {
"path": "./packages/server",
"manager": "javascript",
"dependencies": ["@simulacrum/ui", "@simulacrum/client"]
}
}
All the information we need is there: the type of dependency (javascript), the path to package.json (packages/server/packages.json), and so it should be straightforward to find the value of internal dependencies on @simulacrum/ui, and @simulacrum/client from the source.
This change ought to make it simpler to reckon with other types of dependencies since a separate field would not need to be added for "devDependencies", or for more npm-specific dependency types like "optional" and "peer"
npm specifies its direct dependencies in
package.jsonas well as other types of dependencies likepeerDependencies,devDependencies, andoptionalDependencies, and so it should serve as the primary source of truth for what a package's dependencies are. Otherwise you end up needing to manually keep this information in sync with.changes/config.jsonin order have correct behavior.I've already run afoul of this twice in
@simulacrumwhere I thought that changing a dependency would be reflected in the publishing result.{ "@simulacrum/server": { "path": "./packages/server", "manager": "javascript", "dependencies": ["@simulacrum/ui", "@simulacrum/client"] } }All the information we need is there: the type of dependency (javascript), the path to
package.json(packages/server/packages.json), and so it should be straightforward to find the value of internal dependencies on@simulacrum/ui, and@simulacrum/clientfrom the source.This change ought to make it simpler to reckon with other types of dependencies since a separate field would not need to be added for "devDependencies", or for more npm-specific dependency types like "optional" and "peer"