@@ -44,6 +44,14 @@ export async function listModifiedWorkspaces() {
4444 const modifiedWorkspaces = new Set ( ) ;
4545
4646 for ( const modifiedFile of modifiedFiles ) {
47+ if ( modifiedFile . startsWith ( 'e2e/' ) ) {
48+ continue ;
49+ }
50+
51+ if ( modifiedFile . startsWith ( 'sites/' ) ) {
52+ continue ;
53+ }
54+
4755 for ( const internalDependency of internalDependencies ) {
4856 if ( modifiedFile . startsWith ( internalDependency ) ) {
4957 console . error ( 'modified a private dependency' , modifiedFile ) ;
@@ -59,16 +67,6 @@ export async function listModifiedWorkspaces() {
5967
6068 let isNonWorkspaceFile = true ;
6169 for ( const workspace of workspaces ) {
62- if ( modifiedFile . startsWith ( 'e2e/' ) ) {
63- continue ;
64- }
65-
66- if ( modifiedFile . startsWith ( 'sites/' ) ) {
67- continue ;
68- }
69-
70- console . error ( 'modifiedFile outside of workspaces' , modifiedFile ) ;
71-
7270 if ( modifiedFile . startsWith ( workspace . path ) ) {
7371 isNonWorkspaceFile = false ;
7472
@@ -77,6 +75,7 @@ export async function listModifiedWorkspaces() {
7775 }
7876
7977 if ( isNonWorkspaceFile ) {
78+ console . error ( 'modifiedFile outside of workspaces' , modifiedFile ) ;
8079 // files outside of workspaces include "package-lock.json", rollup config, ...
8180 // anything or everything might have changed
8281 return {
0 commit comments