File tree Expand file tree Collapse file tree
npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,8 +61,9 @@ def updated_package_json_content
6161 # "dependencies" list. For example, the dependencies object can contain same name dependency
6262 # "dep" => "1.0.0" and "dev" => "1.0.1" while package.json can only contain "dep" => "1.0.0".
6363 # The other dependency is not present in package.json so we don't have to update it — this is
64- # most likely a transitive dependency which only needs an update in the lockfile. We avoid
65- # throwing an exception and let the update continue.
64+ # most likely a transitive dependency which only needs an update in the lockfile. For a batch
65+ # with a single unique dependency name we tolerate this no-op update, but when multiple unique
66+ # dependencies are being updated and none change the content we treat that as unexpected and raise.
6667 raise "Expected content to change!" if content == new_content && unique_deps_count > 1
6768
6869 content = new_content
You can’t perform that action at this time.
0 commit comments