You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 35897bf
Browse filesBrowse the repository at this point in the historyBrowse files
Remove unnecessary dependencies from wp-build package.json files (#54061)
wp-build itself doesn't seem to care; apparently the only reason we have
these dependencies is because of the `import/no-extraneous-dependencies`
eslint rule. Meanwhile, Renovate wants to scan and update these
package.json files even though their dependency declarations aren't used
for anything.
We can set the `packageDir` option to `import/no-extraneous-dependencies`
to point it at the package's actual package.json file, and then add a
structure lint check to ensure people don't re-add these dependencies.
LINE=$(jq --stream -r --arg DEPTYPE "$DEPTYPE" --arg DEP "$DEP"'if length == 1 then .[0][:-1] else .[0] end | if . == [$DEPTYPE,$DEP] then ",line=\( input_line_number )" else empty end'"$f")
237
-
echo"::error file=$f${LINE}::Dependency \`$DEP\` should not try to link outside of the project. Cross-project interactions should be done via public APIs."
LINE=$(jq --stream -r --arg DEPTYPE "$DEPTYPE"'if length == 1 then .[0][:-1] else .[0] end | if . == [$DEPTYPE] then ",line=\( input_line_number )" else empty end'"$f")
236
+
if [[ -n"$LINE" ]];then
237
+
EXIT=1
238
+
echo"::error file=$f${LINE}::Wp-build package.json files should not have $DEPTYPE. Any dependencies they require should be in the project's base package.json (\`$PROJECT/package.json\`)."
LINE=$(jq --stream -r --arg DEPTYPE "$DEPTYPE" --arg DEP "$DEP"'if length == 1 then .[0][:-1] else .[0] end | if . == [$DEPTYPE,$DEP] then ",line=\( input_line_number )" else empty end'"$f")
247
+
echo"::error file=$f${LINE}::Dependency \`$DEP\` should not try to link outside of the project. Cross-project interactions should be done via public APIs."
Comment: Clean up unnecessary external dependencies in wp-build package.json files after fixing eslint `import/no-extraneous-dependencies` configuration.
Comment: Clean up unnecessary external dependencies in wp-build package.json files after fixing eslint `import/no-extraneous-dependencies` configuration.
Comment: Clean up unnecessary external dependencies in wp-build package.json files after fixing eslint `import/no-extraneous-dependencies` configuration.
0 commit comments